#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
class Solution {
public:
    vector<vector<int>> generate(int numRows) {
        vector<vector<int>> s(numRows);
        for (size_t i = 0; i < numRows; i++)
        {
            s[i].resize(i + 1);
            *(s[i].begin()) = 1;
            *(s[i].end() - 1) = 1;
            for (size_t j = 1; j < i + 1 - 1; j++)
            {
                s[i][j] = s[i - 1][j] + s[i - 1][j - 1];

            }
        }
        return s;
    }
};